package com.hnyyjsxy.service.impl;

import com.hnyyjsxy.domain.User;
import com.hnyyjsxy.mapper.UserMapper;
import com.hnyyjsxy.service.UserService;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

/**
 * @date 2021/03/16
 */
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    //插入
    @Override
    public void save(User user) {
        userMapper.save(user);
    }


    //查询
    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }
}
